package com.example.yin.service.impl;

import com.example.yin.dao.ListSongMapper;
import com.example.yin.dao.SongListMapper;
import com.example.yin.dao.SongMapper;
import com.example.yin.domain.Collect;
import com.example.yin.domain.ConsumerSongList;
import com.example.yin.domain.ListSong;
import com.example.yin.domain.Song;
import com.example.yin.service.ListSongService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ListSongServiceImpl implements ListSongService {
    @Autowired
    private ListSongMapper listSongMapper;

    @Autowired
    private SongMapper songMapper;

    @Autowired
    private SongListMapper songListMapper;

    @Override
    public boolean addListSong(ListSong listSong) {
        return listSongMapper.addListSong(listSong)>0;
    }

    @Override
    public boolean updateListSongMsg(ListSong listSong) {
        return listSongMapper.updateByPrimaryKey(listSong)>0;
    }

    @Override
    public boolean deleteListSong(Integer id) {
        return listSongMapper.deleteListSong(id)>0;
    }

    @Override
    public List<ListSong> allListSong() {
        return listSongMapper.allListSong();
    }

    @Override
    public List<ListSong> listSongOfSongId(Integer songId) {
        return listSongMapper.listSongOfSongId(songId);
    }
}
